<?php /* @var $this->table My_Html_MagicTable */ ?>
<div id="<?php echo $this->table->getId(); ?>" class="my-magic-table">

    <div class="table-status"></div>

    <?php if (!is_null($this->table->getTitle())): ?>
        <div class="pre-table">    
            <span class="table-title"><?php echo $this->table->getTitle(); ?></span>
            <span class="columns-selector-button">Select more columns &dtrif;</span>
            <div class="columns-selector hidden">
                <!-- COLUMN SELECTOR HERE --> 
            </div>
        </div>
    <?php endif; ?>
    <table>
        <?php if (true == $this->table->getShowHeaders()): ?>
            <thead>
                <!-- YOUR HEADER HERE -->
            </thead>
        <?php endif; ?>
        <tbody>
            <!-- YOUR DATA HERE -->
        </tbody>
    </table>

    <div class="paginator" style="display: none">
        <div class="items-info">
            You have filtered <span class="number-of-listed-items">??</span> of <span class="total-items">??</span> items.
        </div>
        <div class="page-info">
            Page <span class="previous-page">&lt; </span><span class="current-page">??</span> / <span class="total-pages">??</span><span class="next-page"> &gt;</span>
        </div>             
    </div>

</div>

<script type="text/javascript">
    $(function()
    {
        if (undefined == window.tables ) window.tables= {};
        window.tables['<?php echo $this->table->getId();?>'] = new My_Widget_Table('#<?php echo $this->table->getId(); ?>', 
                                                                        '<?php echo $this->table->getUrl(); ?>', 
                                                                        <?php echo $this->table->getOptions(true); ?>);
        
    });
</script>
